#include <algorithm>
#include <cstdio>
#define ll long long
using namespace std;

ll n, k;

int main() {
	// freopen("testdata.in", "r", stdin);
	// freopen("testdata.out", "w", stdout);
	scanf("%lld%lld", &n, &k);
	ll ans = n * k;
	for (int l = 1, r; l <= n; l = r + 1) {
		if (k / l != 0) {
			r = min(n, k / (k / l));
		} else {
			r = n;
		}
		ans -= (k / l) * (r - l + 1) * (l + r) / 2;
	}
	printf("%lld", ans);
	return 0;
}